//
//  ApeViewController.h
//  ApeFoundation
//
//  Created by Eton on 2016/10/25.
//  Copyright © 2016年 ApeStar. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ApeNavigationController.h"

#define kSELF_NC self.navigationController

@interface ApeViewController : UIViewController

/**
 *  是否已完成第一次界面显示
 */
@property (nonatomic) BOOL isViewDidFirstAppear;


@end


/**
 请求时，加载菊花框
 */
@class MBProgressHUD;
@class NetworkView;
@interface ApeViewController (ApeNetworkLoading)

@property (nonatomic, assign) BOOL isLoading;

@property (nonatomic,strong) MBProgressHUD* processHud;

@property (nonatomic,strong) NetworkView * networkView;

- (void)showLoading;
- (void)disLoading;
- (void)loadingFailure:(NSError *)error;

@end

/**
 导航栏工具
 */
@interface ApeViewController (ApeNavBarItemUtil)

@property (nonatomic,strong) UILabel* titleLabel;

- (UIButton *)addRightBarText:(NSString *)text image:(UIImage *)image clickBlcok:(void(^)())clickBlcok;
- (UIButton *)addLeftBarText:(NSString *)text image:(UIImage *)image clickBlcok:(void(^)())clickBlcok;

- (UIButton *)crateBackButton;

- (void)back;

@end

/**
 Tab栏工具
 */
@interface ApeViewController (ApeTabBarItemUtil)

@property (nonatomic, readwrite, assign) UIEdgeInsets imageInsets;  // default is UIEdgeInsetsZero

@property (nonatomic, readwrite, assign) UIOffset titlePositionAdjustment; // default is UIOffsetMake(0, -3)

- (void)setTabBarItemTitle:(NSString *)title imageName:(NSString *)imageName selectedImageName:(NSString *)selectedImageName;

@end

